Skip to content

docs: update context-discipline for EGG_REAL_BACKEND_WINDOW injection [doc-updater] - #3348

Merged
jwbron merged 1 commit into
mainfrom
egg/doc-update-real-backend-window-injection
Jun 28, 2026
Merged

docs: update context-discipline for EGG_REAL_BACKEND_WINDOW injection [doc-updater]#3348
jwbron merged 1 commit into
mainfrom
egg/doc-update-real-backend-window-injection

Conversation

@james-in-a-box

Copy link
Copy Markdown
Contributor

docs: update context-discipline for EGG_REAL_BACKEND_WINDOW injection

Update docs/architecture/context-discipline.md to reflect that
EGG_REAL_BACKEND_WINDOW is now always injected by
_ExecutorEventSpawner.spawn_event at event spawn time, landing in #3316.

Triggered by: #3330

Issue: none

Test Plan

Authored-by: egg

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns. This is a documentation-only change updating the EGG_REAL_BACKEND_WINDOW env-var description to reflect always-injected behaviour at event spawn time (#3316); it touches no prompt construction, pre-fetching, output-format, post-processing, or model-identifier surfaces.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. Doc-only change; every factual claim verified against the code at HEAD.

I treated this as an accuracy review (the diff makes specific claims about runtime behaviour) and traced each one to source:

  • "the orchestrator always computes real_backend_window(model) and exports the integer here via _ExecutorEventSpawner.spawn_event (#3316)" — confirmed. _ExecutorEventSpawner.spawn_event (orchestrator/concurrent_executor.py:166, class at :142) sets env["EGG_REAL_BACKEND_WINDOW"] = str(real_window) at :195, unconditionally — not gated behind a discipline/measurement flag — so "always injected" is accurate. The value comes from _build_event_spawn_params:659 (real_window = real_backend_window(decision.claude_code_alias)), and real_backend_window(model) exists at orchestrator/agent_model_resolution.py:468. The method/class name in the doc matches exactly.
  • "the measurement's orchestrator-import fallback is inert on the production event-pump path" — confirmed. _resolve_real_window (shared/egg_agent/measurement.py:208) reads $EGG_REAL_BACKEND_WINDOW first (:229); the from orchestrator.agent_model_resolution import real_backend_window fallback at :240 always raises in-pod (orchestrator off PYTHONPATH).
  • "In dev/CI … the measurement also imports the helper directly" — confirmed (:239-247).
  • "Both window-relative metrics degrade to None on pre-#3316 pods where the export is absent" — confirmed: with no override and no importable orchestrator, resolution returns None.
  • Parallel phrasing with EGG_RESEED_THRESHOLD — the rewritten row and the new "Setting the flags in production" sentence are consistent with the existing EGG_RESEED_THRESHOLD row (:234) and the #3284 paragraph.
  • Issue reference#3316 exists, is CLOSED, and its title ("Inject EGG_REAL_BACKEND_WINDOW into agent event pods") matches the doc's description of its effect.

No inaccuracies, no stale/contradicting references elsewhere in the docs (checked docs/ for EGG_REAL_BACKEND_WINDOW / real_backend_window). The doc now correctly reflects post-#3316 behaviour. No blocking or non-blocking issues.

— Authored by egg

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

1 previous review(s) hidden.

@jwbron
jwbron merged commit e3671bb into main Jun 28, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant